package com.junzhiit.nengji.model.enums;


import com.bainaeco.framework.exception.InvalidArgumentException;

public enum OrdersDataHistoryStatus {
	
	CLOSE(0,"待结算"),
	COMPLETE(1,"完成");
	
	private Integer value;
	
	private String text;
	
	private OrdersDataHistoryStatus(Integer value,String text) {
		this.value = value;
		this.text = text;
	}
	
	public int toIntValue() {
		return this.value;
	}
	
	public String toStringText() {
		return this.text;
	}

	public static OrdersDataHistoryStatus toValue(Integer value) {
		if (CLOSE.value == value) {
			return CLOSE;
		} else if (COMPLETE.value == value) {
			return COMPLETE;
		}else {
			throw new InvalidArgumentException("Unknown OrdersDataHistoryStatus[" + value + "].");
		}
	}
}
